/**
 * 
 */
package me.magicall.test.jsoup;

import java.io.IOException;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.parser.Tag;

/**
 * @author MaGiCalL
 * @email wenjian.liang@opi-corp.com
 * @version Jul 7, 2011 3:22:24 PM
 */
public class ToJSoup {

	public static Document doc(final String url) {
		try {
			return Jsoup.connect(url).get();
		} catch (final IOException e) {
			e.printStackTrace();
			return null;
		}
	}

	public static Document doc(final String content, final String url) {
		return Jsoup.parse(content, url);
	}

	public static void main(final String[] args) {
		final String s = "<td class=\"data\">964494|一念执着（胡歌&Alan）|33033|步步惊心|73905|步步惊心 原声带|1041355|127|5|1|3|5111881|2046225|320000|0|0|1825961</td>";
		final Tag tag = Tag.valueOf(s);
		System.out.println("@@@@@@" + tag);
	}
}
